package cn.buk.qms.service;

import cn.buk.common.JsonResult;
import cn.buk.common.dto.CommonDto;
import cn.buk.common.dto.eterm.FfDto;
import cn.buk.common.flight.dto.FlightInfoDto;
import cn.buk.common.flight.intl.response.IntlFlightResponseDto;
import cn.buk.common.sc.CommonSearchCriteria;
import cn.buk.flight.entity.FdRequest;
import cn.buk.flight.entity.FdResult;
import cn.buk.flight.entity.SkInfo;

import java.util.Date;
import java.util.List;

/**
 * User: william
 * Date: 13-8-18
 * Time: 上午12:12
 * @author yfdai
 */
public interface FlightService {

    /**
     * 查找国内航班
     */
    CommonDto<FlightInfoDto> searchFlight(int enterpriseId, String username, String dcity, String acity, Date ddate,
                                          int source, String remoteAddr);

    /**
     * 查询国际航班
     */
    IntlFlightResponseDto searchIntlFlight(int enterpriseId, int routeType, String dcity, String acity, Date ddate, Date adate, String remoteAddr, String openid);

    List<FdRequest> searchFdRequest(int enterpriseId, CommonSearchCriteria sc);

    /**
     * 删除所有FD下载请求
     * @param enterpriseId
     * @return
     */
    int deleteAllPriceRequest(int enterpriseId);

    /**
     * 生成运价下载请求
     * @param enterpriseId
     * @param carrier
     * @param dport
     * @param aport
     * @param ddate
     * @return
     */
    JsonResult createPriceRequest(int enterpriseId, String carrier, String dport, String aport, String ddate);

    /**
     * 通过Excel文件上传，生成运价下载请求
     * @param enterpriseId
     * @param fileName
     * @return
     */
    JsonResult createPriceRequestByExcel(int enterpriseId, String fileName);

    int deletePriceRequest(int enterpriseId, int id);

    List<FdResult> searchFdResult(int enterpriseId, CommonSearchCriteria sc);

    int deleteAllPriceResult(int enterpriseId);

    List<SkInfo> searchAirlineSchedules(CommonSearchCriteria sc);

    JsonResult execEtermCmd(int enterpriseId, String hostcmd, String openid);

    /**
     * 查找航班的经停信息
     * @param enterpriseId
     * @param flightNo
     * @param ddate
     * @return
     */
    FfDto searchFlightStopover(int enterpriseId, String flightNo, String ddate);
}
